package models

import "gorm.io/gorm"

type Order struct {
	gorm.Model
	UserId      int64   `gorm:"type:int(10);comment:'用户id'"`
	CourseId    int64   `gorm:"type:int(10);comment:'课程id'"`
	OrderSn     string  `gorm:"type:varchar(100);comment:'订单编号'"`
	OrderPrice  float64 `gorm:"type:decimal(10,2);comment:'订单价格'"`
	OrderStatus int64   `gorm:"type:tinyint(1);comment:'订单状态 1未支付 2已支付 3待支付'"`
	Payment     int64   `gorm:"type:tinyint(1);comment:'支付类型 1支付宝 2微信 3银行卡 '"`
	CourseTitle string  `gorm:"type:varchar(50);comment:'课程标题'"`
	CoursePrice float64 `gorm:"type:decimal(10,2);comment:'课程价格'"`
}

func (o *Order) TableName() string {
	return "order"
}
